//
//  WmcMyTeamsHeadView.swift
//  YPWatermarkCamera
//
//  Created by yupao_ios_macmini06 on 2022/9/15.
//

import UIKit

class WmcMyTeamsHeadView: WmcBaseView {
    override func makeUI() {
        backgroundColor = UIColor.wmc_gray_F7F8FA

        addSubview(createTeamBtn)
        addSubview(verticalLineView)
        addSubview(joinTeamBtn)

        let centerx1 = Wmc_screenWidth / 2.0 / 2.0
        let centerx2 = Wmc_screenWidth * 3 / 4.0

        createTeamBtn.snp.makeConstraints { make in
            make.top.equalTo(16)
            make.bottom.equalTo(-16)
            make.centerX.equalTo(centerx1)
            make.height.equalTo(28)
        }

        verticalLineView.snp.makeConstraints { make in
            make.centerX.equalToSuperview()
            make.top.equalTo(20)
            make.bottom.equalTo(-20)
            make.width.equalTo(1)
        }

        joinTeamBtn.snp.makeConstraints { make in
            make.top.equalTo(createTeamBtn.snp.top)
            make.bottom.equalTo(createTeamBtn.snp.bottom)
            make.centerX.equalTo(centerx2)
        }
    }

    lazy var createTeamBtn: WmcLeftImgRightTextBtn = {
        let view = WmcLeftImgRightTextBtn(title: "创建团队",
                                          image: "create_team_icon".wmc_image)
        view.font = 17.wmc_font
        view.imgSize = 28.wmc_autoHor
        view.textColor = UIColor.wmc_grayH2_323233
        view.imgTextSpacing = 8
        return view
    }()

    lazy var verticalLineView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor.wmc_grayH14_CCCCCC
        return view
    }()

    lazy var joinTeamBtn: WmcLeftImgRightTextBtn = {
        let view = WmcLeftImgRightTextBtn(title: "加入团队",
                                          image: "join_team_icon".wmc_image)
        view.font = 17.wmc_font
        view.imgSize = 28.wmc_autoHor
        view.textColor = UIColor.wmc_grayH2_323233
        view.imgTextSpacing = 8
        return view
    }()
}
